import numpy as np
import pandas as pd
from psycopg2 import pool

dsn = 'host=localhost port=5432 dbname=postgres user=postgres password=postgres'
pools = pool.SimpleConnectionPool(1,8,dsn=dsn)

conn = pools.getconn()

print(conn)